package com.irving;

public class StaticSingleton {
    private StaticSingleton(){
//        if (LazyHolder.instance != null){
//            throw new RuntimeException("不允许创建多个实例！");
//        }
    }

    public static StaticSingleton getInstance(){
        return LazyHolder.instance;
    }

    private static class LazyHolder{
        private static final StaticSingleton instance = new StaticSingleton();
    }
}
